home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
T-TPUG Old Monthly Disks
/
(c)tt.d64
/
ponzo tutor-2.c
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
17KB
|
533 lines
0 RUN00100
1 REM"
2 [143]"PONZO*1983*WATERLOO
3 REM"
100 [151]53281,15:[151]53280,12:[153]"STOP":[153]"LOAD C64 TUTOR-2
101 PRINT"[176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]"
102 PRINT"[221] MORE C64 BASIC [146] [221]":MS$=" WELCOME! "
103 PRINT"[173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189][144]"
104 SN$="1000":GOSUB63200:GOSUB63600
105 GOSUB60000:GOSUB59000
1000 GOSUB60000:GOSUB20000
1005 PRINT"[147]IN THIS,THE 2ND PART OF "CHR$(34)"TUTOR"CHR$(34)
1010 PRINT"WE'LL TALK ABOUT THE MANIPULATION OF"
1020 PRINT" STRINGS."
1030 PRINT" [183][183][183][183][183][183][183]"
1040 PRINT"RECALL[146]: ANY VARIABLE WHOSE NAME ENDS"
1050 PRINT"WITH A $ IS INTERPRETED AS A STRING"
1060 PRINT"OF SYMBOLS, AND NOT A NUMBER OR AN"
1070 PRINT"INSTRUCTION."
1080 PRINT"SO..THE STATEMENT:"
1090 PRINT"A$="CHR$(34)"123*456/789"CHR$(34)
1100 PRINT"MEANS THAT A$ IS THAT SET OF SYMBOLS!"
1110 PRINT" [183][183]"
1120 PRINT"(..AND I CERTAINLY WON'T EVALUATE A$)"
1130 PRINT" [163][163][163][163][163][163][163][163]"
1140 PRINT"NOW, ONE VERY NICE SET OF SYMBOLS IS:"
1150 PRINT"[165] [180] [181] [161] [182][146] [182][146] [170][146] [146]"
1155 PRINT
1160 PRINT"WE'LL CALL THEM S$(1), S$(2),..,S$(8)"
1170 GOSUB63000
1190 PRINT"[147]WE'LL TYPE:":PRINT
1200 PRINT"10 S$(1)="CHR$(34)"[165]"
1210 PRINT"20 S$(2)="CHR$(34)"[180]"
1220 PRINT"30 S$(3)="CHR$(34)"[181]"
1230 PRINT"40 S$(4)="CHR$(34)"[161]"
1235 PRINT"50 S$(5)="CHR$(34)"[182][146]"
1240 PRINT"60 S$(6)="CHR$(34)"[170][146]"
1250 PRINT"70 S$(7)="CHR$(34)"[167][146]"
1260 PRINT"80 S$(8)="CHR$(34)" [146]"
1261 PRINT" ^THAT'S RVS-OFF"
1270 PRINT"STRANGE?"
1280 PRINT"WELL, THE 1ST 4 ARE ON THE KEYBOARD."
1290 PRINT"THE LAST 4 ARE OBTAINED BY RVS[146]ING"
1300 PRINT"THE CHARACTERS[192][192][192][192][192]> [182],[170],[167],AND "
1310 PRINTSPC(32)"^"
1320 PRINTSPC(31)"THAT'S A"
1330 PRINTSPC(31)"SPACE. "
1340 PRINT"[145][145]NOTE THAT WE TURN"
1350 PRINT"THE RVS OFF TOO!"
1360 PRINT" [163][163][163]"
1370 PRINT"ALSO..WE DON'T NEED THE LAST QUOTES."
1380 PRINT"I'LL UNDERSTAND THE "CHR$(34)"RETURN"CHR$(34)
1390 PRINT"TO MEAN THE END OF THE STATEMENT."
1400 PRINT:GOSUB63000
1420 PRINT"[147]NOW I'LL PRINT THE STATEMENTS #10-80"
1430 PRINT"AGAIN, AND YOU CAN MOVE THE C'SOR TO"
1440 PRINT"TO #10, THEN KEEP PRESSING RETURN,"
1450 PRINT"SO I'LL THINK YOU TYPED THEM,AND I'LL"
1460 PRINT"REMEMBER THEM.[163][163][163]"
1470 PRINT"[163][163][163][163][163][163][163][163]"
1500 PRINT"10 S$(1)="CHR$(34)"[165]"
1510 PRINT"20 S$(2)="CHR$(34)"[180]"
1520 PRINT"30 S$(3)="CHR$(34)"[181]"
1530 PRINT"40 S$(4)="CHR$(34)"[161]"
1535 PRINT"50 S$(5)="CHR$(34)"[182][146]"
1540 PRINT"60 S$(6)="CHR$(34)"[170][146]"
1550 PRINT"70 S$(7)="CHR$(34)"[167][146]"
1560 PRINT"80 S$(8)="CHR$(34)" [146]"
1570 PRINT:PRINT"WHEN YOU'VE DONE THAT, TYPE:"
1580 PRINT:PRINT"LIST10-80"
1590 PRINT:PRINT"..SO YOU'LL BE SURE I GOT THEM!"
1600 PRINT:PRINT" (TO CONTINUE...TYPE @[146])"
1700 SN$="02000":GOTO63400
2000 GOSUB60000
2001 DIMD$(12),V(12)
2006 D$(1)="JAN":D$(2)="FEB":D$(3)="MAR":D$(4)="APR"
2007 D$(5)="MAY":D$(6)="JUN":D$(7)="JUL":D$(8)="AUG"
2008 D$(9)="SEP":D$(10)="OCT":D$(11)="NOV":D$(12)="DEC"
2110 V(1)=10:V(2)=15:V(3)=20:V(4)=25:V(5)=30:V(6)=31
2120 V(7)=25:V(8)=20:V(9)=15:V(10)=12:V(11)=11:V(12)=10
2130 FORI=1TO12:PRINT""D$(I)"-"STR$(V(I))"[167]";
2140 FORJ=1TOV(I):PRINT" ";:NEXT
2150 PRINTS$(8*(V(I)-INT(V(I)))):NEXT
2160 FORI=1TO500:NEXT
2170 PRINT:PRINT" NICE?"
2175 FORI=1TO500:NEXT
2180 PRINT:PRINT" LET'S TRY IT!"
2190 FORI=1TO500:NEXT
2200 PRINT"FIRST, WE'LL DEFINE THE STRINGS:"
2201 PRINT
2210 PRINT"M$(1)="CHR$(34)"JAN"CHR$(34)
2220 PRINT"M$(2)="CHR$(34)"FEB"CHR$(34)
2229 PRINT
2230 PRINT"..ETC."
2240 GOSUB63000
2250 PRINT"[147]"
2260 PRINT"..ACTUALLY, JUST TO DEMONSTRATE ANOTHER"
2270 PRINT"TALENT OF MINE, WE'LL DO IT THIS WAY:"
2280 PRINT:PRINT"100 DATA "CHR$(34)"JAN"CHR$(34)","CHR$(34)"FEB"CHR$(34)",";
2290 PRINTCHR$(34)"MAR"CHR$(34)","CHR$(34)"APR"CHR$(34)","CHR$(34)"MAY"CHR$(34)
2295 PRINT"101 DATA "CHR$(34)"JUN"CHR$(34)","CHR$(34)"JUL"CHR$(34)",";
2296 PRINTCHR$(34)"AUG"CHR$(34)","CHR$(34)"SEP"CHR$(34)","CHR$(34)"OCT"CHR$(34)
2297 PRINT"102 DATA "CHR$(34)"NOV"CHR$(34)","CHR$(34)"DEC"CHR$(34)
2350 PRINT:PRINT"THESE "CHR$(34)"DATA"CHR$(34)" STATEMENTS"
2360 PRINT"DEFINE A NUMBER OF STRINGS, CALLED"
2370 PRINT"JAN,FEB,MAR,ETC.."
2380 PRINT"NOW TYPE:"
2390 PRINT:PRINT"103 FORI=1TO12:READ M$(I):NEXT"
2400 PRINT:PRINT"THIS "CHR$(34)"READS"CHR$(34)" THE DATA STATEMENTS AND"
2410 PRINT"ASSIGNS THE STRING "CHR$(34)"JAN"CHR$(34)" TO M$(1),"
2420 PRINT"AND THE STRING "CHR$(34)"FEB"CHR$(34)" TO M$(2)..ETC."
2425 GOSUB63000
2430 PRINT"[147]YOU'LL HAVE TO TELL ME HOW MANY OF THE"
2440 PRINT"M$(1),M$(2),ETC. YOU HAVE, SO I CAN"
2450 PRINT"LEAVE ROOM FOR THEM IN MY MEMORY,"
2460 PRINT"SO YOU'LL NEED A STATEMENT:"
2470 PRINT"90 DIM M$(12)"
2480 PRINT"THIS SAYS: THE DIMENSION OF THE ARRAY"
2490 PRINT"OF STRINGS CALLED M$(I) IS 12"
2500 GOSUB63000
2519 PRINT"[147]...ALTOGETHER NOW!":PRINT
2540 FORI=1TO500:NEXT
2570 PRINT"90 DIM M$(12) "
2580 PRINT"100 DATA JAN,FEB,MAR,APR,MAY,JUN"
2600 PRINT"101 DATA JUL,AUG,SEP,OCT,NOV,DEC"
2610 PRINT"102 FORI=1TO12:READ M$(I):NEXT "
2620 PRINT"NOTE[157][157][157][157][184][184][184][184][145]:IF ALL[146] THE DATA ARE STRINGS"
2625 PRINT"THEN YOU CAN OMIT THE QUOTES!"
2630 PRINT:PRINT"(DON'T ENTER THE STATEMENTS JUST YET)."
2640 GOSUB63000
2650 PRINT"[147]NOW YOU'LL WANT TO INPUT THE 12 VALUES"
2660 PRINT"WHICH GIVE THE LENGTH OF THE BARS."
2670 PRINT"TYPE:"
2680 PRINT"105 FOR I=1TO12 "
2690 PRINT"110?M$(I)"CHR$(34)" VALUE="CHR$(34)
2700 PRINT"120 INPUT V(I) "
2705 PRINT:PRINT"NOTE THAT#110 WILL PRINT A PROMPTING"
2706 PRINT" REMARK, SUCH AS:"
2707 PRINT:PRINT"JAN VALUE=?"
2708 PRINT:GOSUB63000
2710 PRINT"[147][209]SINCE YOU'LL PRINT 150 OF S$(8)= [146]"
2720 PRINT"(IF AN INPUT VALUE IS 150)AND I'VE"
2730 PRINT"GOT ONLY"WD" COLUMNS ON MY SCREEN(!),"
2740 PRINT"YOU'D BETTER REDUCE ALL THE VALUES"
2750 PRINT"SO THE LARGEST IS,SAY,30."
2760 PRINT"SO..YOU'LL HAVE TO FIND THE LARGEST."
2761 PRINT" [183][183][183][183]"
2770 PRINT"[209]YOU SEE,WE'RE GOING TO PRINT A "CHR$(34)"BAR"CHR$(34)
2780 PRINT"WITH A LENGTH PROPORTIONAL TO EACH V-"
2790 PRINT"INPUT,AND WE'LL DO THIS BY PRINTING A"
2800 PRINT"NUMBER OF [146]_THESE,AND THEY'RE S$(8)"
2810 PRINT"...REMEMBER?"
2820 GOSUB63000:PRINT
2830 PRINT"WE'LL TYPE:"
2840 PRINT"104 MAXV=0"
2850 PRINT"130 IF MAXV<V(I) THEN MAXV=V(I)"
2860 FORI=1TO1000:NEXT
2870 PRINT"THEN WE'LL HAVE:"
2875 PRINT"104 MAXV=0"
2880 PRINT"105 FOR I=1TO12"
2890 PRINT"110 ?M$(I)"CHR$(34)" VALUE="CHR$(34)
2900 PRINT"120 INPUT V(I)"
2950 PRINT"130 IF MAXV<V(I) THEN MAXV=V(I)"
2960 PRINT:PRINT"HIT A KEY"
2961 GETA$:IFA$=""THEN2961
2970 PRINT:PRINT"IN #130 WE CHECK IF MAXV (ORIGINALLY 0)"
2980 PRINT"IS LESS THAN.. < ..THE V-VALUE"
2990 PRINT"INPUT. IF SO,WE SET MAXV=THE V-VALUE."
3000 PRINT"WHEN THE "CHR$(34)"FOR-NEXT"CHR$(34)" LOOP"
3010 PRINT"IS FINISHED, MAXV WILL EQUAL THE MAX."
3020 PRINT"OF THE V-VALUES!"
3025 GOSUB63000
3030 PRINT"[147]IF A VALUE IS, SAY,123456.7"
3040 PRINT"THEN IT'LL TAKE UP 8 SPACES TO PRINT"
3050 PRINT"AND WE'LL HAVE TO KNOW THIS,SO.."
3060 PRINT"WHILE INPUTTING THE V'S & FINDING"
3070 PRINT"THEIR MAX'M VALUE, YOU CAN ALSO FIND"
3080 PRINT"THE MAX'M LENGTH OF THE NUMBERS V(I)."
3090 PRINT" [163][163][163][163][163][163]"
3100 GOSUB63000
3110 PRINT"[147]FIRST WE'LL CHANGE THE NUMBER V(I)"
3120 PRINT" [163][163][163][163][163][163]"
3130 PRINT"TO A STRING OF SYMBOLS,"
3140 PRINT" [163][163][163][163][163][163]"
3150 PRINT"BY SETTING: X$=STR$(V(I))"
3170 PRINT"THEN WE'LL FIND THE LENGTH OF X$"
3171 PRINT
3180 PRINT"L=LEN(X$)"
3185 GOSUB63000
3190 PRINT"[147]WE TYPE:"
3200 PRINT"140 X$=STR$(V(I)):L=LEN(X$)"
3210 FORI=1TO1000:NEXT
3220 PRINT"..OR,WHY NOT?.."
3230 PRINT"140 L=LEN(STR$(V(I)))"
3235 PRINT"NOTE THAT STR$(V)[146] CHANGES A NUMBER"
3236 PRINT"V TO A STRING OF CHARACTERS!"
3237 PRINT"..AND LEN(V$)[146] GIVES THE LENGTH OF "
3238 PRINT"A STRING V$!"
3240 GOSUB63000
3250 PRINT"TO FIND THE MAX'M "CHR$(34)"LENGTH"CHR$(34)" OF THE V'S,"
3260 PRINT"TYPE:"
3270 PRINT"150 IF ML<L THEN ML=L"
3280 PRINT"(JUST AS WE DID TO FIND THE MAX'M VALUE)"
3290 GOSUB63000
3300 PRINT"[147]NOW WE END THE FOR-NEXT LOOP!"
3310 PRINT"[183][183][183] [163][163][163][163][163][163][163][163]"
3320 PRINT"160 NEXT"
3330 GOSUB63000
3340 PRINT"[147] WHAT HAVE WE GOT SO FAR?"
3350 FORI=1TO500:NEXT
6570 PRINT"90 DIM M$(12),V(12)"
6580 PRINT"100 DATA JAN,FEB,MAR,APR,MAY,JUN"
6600 PRINT"101 DATA JUL,AUG,SEP,OCT,NOV,DEC"
6630 PRINT"102 FORI=1TO12:READ M$(I)
6640 [153]"104 MAXV=0:ML=0"
6680 [153]"105 FOR I=1TO12"
6690 [153]"110 ?M$(I)"[199](34)" VALUE="[199](34)
6700 [153]"120 INPUT V(I)"
6850 [153]"130 IF MAXV<V(I) THEN MAXV=V(I)"
7230 [153]"140 L=LEN(STR$(V(I)))"
7240 [153]"150 IF ML<L THEN ML=L"
7320 [153]"160 NEXT"
7330 [153]:[153]"NOTE THAT WE'VE ADDED THE DIMENSION"
7340 [153]"OF THE V'S, IN #90."
7350 [153]"WE'VE ALSO STARTED ML,(THE MAX'M LENGTH"
7360 [153]"OF THE V'S),WITH THE VALUE 0..IN#104."
7370 [141]63000
7380 [153]"OK..YOU ENTER THESE STATEMENTS."
7390 [153]" TAB(TAB(TAB("
7400 [153]"TYPE RUNWAIT TO START YOUR PROGRAM,"
7410 [153]"AND SEE IF IT WORKS SO FAR!"
7420 [153]"AFTER ENTERING 12 NUMBERS,WHEN ASKED,"
7430 [153]"YOU CAN TYPE: "
7440 [153]"?V(3)"
7450 [153]"AND I'LL PRINT THE MARCH VALUE ENTERED."
7460 [153]"WHEN YOU WANT TO CONTINUE, TYPE @"
7470 [153]"HERE'S THE PROGRAM AGAIN:"
7490 [141]63000
7510 [153]"LOADREMEMBER,YOU NEEDN'T RETYPE ALL THIS!"
7520 [153]"JUST PRESS HOME AND A BUNCH OF RETURNS."
7530 [153]" TAB(TAB(TAB(TAB( TAB(TAB(TAB(TAB(TAB(TAB("
7535 [153]:[153]"(..AND I'LL THINK YOU TYPED THEM)"
7540 [141]63000
7550 [153]"LOAD";
8570 [153]"90 DIM M$(12),V(12)"
8580 [153]"100 DATA JAN,FEB,MAR,APR,MAY,JUN"
8600 [153]"101 DATA JUL,AUG,SEP,OCT,NOV,DEC"
8630 :[153]"102 FORI=1TO12:READ M$(I):NEXT"
8640 [153]"104 MAXV=0:ML=0"
8680 [153]"105 FOR I=1TO12"
8690 [153]"110 ?M$(I)"[199](34)" VALUE="[199](34)
8700 [153]"120 INPUT V(I)"
8850 [153]"130 IF MAXV<V(I) THEN MAXV=V(I)"
9230 [153]"140 L=LEN(STR$(V(I)))"
9240 [153]"150 IF ML<L THEN ML=L"
9320 [153]"160 NEXT"
9330 [153]"(REMEMBER..TYPE @WAIT TO CONT.)"
9340 SN$[178]"10000":[137]63400
10000 [141]60000:[153]"LOADOK..LET'S FORGE AHEAD!"
10001 MS$[178]"GO!GO!GO!":[141]63100
10002 [141]63000
10010 [153]"LOADWE'LL START PRINTING THE BARS."
10020 [153]"TYPE:"
10030 [153]:[153]"170 FORI=1TO12
10040 PRINT"180 ?"CHR$(34)""CHR$(34)"M$(I)"CHR$(34)"-"CHR$(34)";
10050 [153]"190 L$=STR$(V(I))
10060 PRINT"200 L=LEN(L$)
10090 [153]"230 ?"[199](34)""[199](34)"L$"[199](34)"THEN"[199](34)";"
10100 [153]"240 S=V(I)*30/MAXV"
10110 [153]"250 IS=INT(S):FS=S-IS"
10120 [153]"260 FORJ=1TOIS:?S$(8);:NEXT"
10130 [153]"270 ?S$(8*FS)"
10140 [153]"280 NEXT"
10150 [153]:[153]"#180 PRINTS(IN RVS)THE MONTH,AND A -."
10160 [153]"#190/200 CONVERTS THE VALUE V(I) TO A"
10170 [153]" STRING (L$),AND DETERMINES THE"
10180 [153]" LENGTH OF THE STRING (L)."
10185 [153]"#230 PRINTS L$ AND A THENWAIT"
10190 [153]"#240 REDUCES THE VALUE OF THE V'S SO"
10200 [153]" THE LARGEST IS 30. THE REDUCED VALUE"
10210 [153]" IS CALLED S."
10220 [153]"HIT A KEYWAIT"
10230 [161]A$:[139]A$[178]""[167]10230
10240 [153]:[153]"#250 GETS THE INTEGER PART OF S..(IS)"
10250 [153]" AND THE FRACTIONAL PART OF S..(FS)"
10260 [153]"#260 PRINTS A BUNCH OF WAIT'S"
10270 [153]"#270 PRINTS THE FINAL FRACTIONAL PIECE"
10280 [153]" OF S$(8),NAMELY S$(1) OR S$(2)..ETC."
10290 [153]" ACCORDING TO THE SIZE OF THE FRACT'L"
10300 [153]" PART OF S, NAMELY FS."
10400 [141]63000
10420 [153]"LOADPLEASE ENTER THE PROGRAM."
10430 [153]"I'LL PUT IT RIGHT AFTER THE STATEMENTS"
10440 [153]"#99-#160. AFTER YOU HAVE ENTERED IT.."
10450 [153]"TRY ITWAIT!"
10460 [153]"IN PARTICULAR, ENTER VALUES"
10470 [153]"WHICH HAVE DIFFERENT LENGTHS,LIKE:"
10480 [153]"123 AND 1234."
10490 [153]"(THEN YOU'LL SEE WE'VE GOT SOME WORK TO"
10500 [153]"DO ON THE PROGRAM!)"
10600 [153]"SEE IF YOU CAN FIX ITWAIT!"
10610 [153]"(THEN TYPE @WAIT TO CONTINUE)"
10630 [153]"RETURNWAIT TO GET THE PROGRAM"
10639 [141]63001
10650 [153]"LOADHERE IT IS AGAIN."
10660 [129]I[178]1[164]500:[130]
11000 [153]"LOAD"
11030 [153]:[153]"170 FORI=1TO12
11040 PRINT"180 ?"CHR$(34)""CHR$(34)"M$(I)"CHR$(34)"-"CHR$(34)";
11050 [153]"190 L$=STR$(V(I))
11060 PRINT"200 L=LEN(L$)
11090 [153]"230 ?"[199](34)""[199](34)"L$"[199](34)"THEN"[199](34)";"
11100 [153]"240 S=V(I)*30/MAXV"
11110 [153]"250 IS=INT(S):FS=S-IS"
11120 [153]"260 FORJ=1TOIS:?S$(8);:NEXT"
11130 [153]"270 ?S$(8*FS)"
11140 [153]"280 NEXT"
11150 [153]:[153]"(TYPE @WAIT TO CONT.)"
11160 SN$[178]"12000":[137]63400
12000 [141]60000:[153]"LOAD": MS$[178]"WORK TO DO":[141]63100
12005 [153]"LOADYOU CAN SEE HOW IMPORTANT THE LENGTH"
12010 [153]"OF THE VALUES IS! IN FACT THAT'S WHY I"
12020 [153]"ASKED YOU TO INCLUDE THE STATEMENTS:"
12030 [153]"190L$=STR$(V(I))"
12040 [153]"200L=LEN(L$)"
12050 [153]"THE PROGRAM DIDN'T EVEN USE THEM!WAIT"
12060 [153]"NOW ..."
12065 [153]"WE'LL INSERT #210 & #220:":[153]
12070 [153]"210 IF L=ML GOTO230
12080 PRINT"220 FORJ=1TOML-L:?S$(8);:NEXT
12090 [153]"230 ?"[199](34)""[199](34)"L$"[199](34)"THEN"[199](34)";"
12100 [153]"240 S=V(I)*30/MAXV"
12110 [153]"ETC.":[153]
12120 [153]"HIT A KEYWAIT"
12130 [161]A$:[139]A$[178]""[167]12130
12140 [153]:[153]"IF THE VALUE ABOUT TO BE PRINTED"
12150 [153]"IS "[199](34)"SHORT"[199](34)",WE INSERT SOME WAIT'S"
12160 [153]"SO EVERY PRINTING OF THE V'S HAS THE"
12170 [153]"SAME NO. OF SPACES."
12180 [153]"#220 INSERTS THESE WAIT'S BEFORE PRINTING"
12190 [153]"THE VALUE,IN #230(CALLED L$)."
12200 [153]"IF THE VALUE ABOUT TO BE PRINTED HAS"
12210 [153]"MAX'M LENGTH (L=ML) WE OMIT THE WAIT'S."
12211 [153]" TAB(TAB(TAB(TAB(TAB("
12220 [141]63000
12230 [153]"LOADFINALLYWAIT,IN A FOR-NEXT LOOP"
12240 [153]"I ALWAYS OBEY THE INST'NS BETWEEN"
12250 [153]" "[199](34)"FOR"[199](34)" AND "[199](34)"NEXT"
12260 [153]"AT LEAST ONCE BEFORE CHECKING IF I'VE"
12270 [153]"DONE THEM OFTEN ENOUGH!"
12280 [153]"THAT MEANS THAT,IN A LOOP SUCH AS:"
12290 [153]"260 FOR J=1 TO IS"
12300 [153]:[153]"I'LL OBEY THE NEXT INST'N ONCE"
12310 [153]"EVEN IF "[199](34)"IS"[199](34)" IS ZERO(!)"
12320 [153]"SO YOU MUST CHECK FOR: IS=0 LIKE SO:"
12330 [153]"255 IF IS=0 GO TO 270"
12340 [153]"THEN,IN #270,YOU PRINT THE FRACT'L PIECE"
12350 [153]"OF S$(8) ONLY."
12360 [141]63000
12370 [153]"THE "[199](34)"FINISHED"[199](34)" PRODUCT IS:"
13030 [153]:[153]"170 FORI=1TO12
13040 PRINT"180 ?"CHR$(34)""CHR$(34)"M$(I)"CHR$(34)"-"CHR$(34)";
13050 [153]"190 L$=STR$(V(I))
13060 PRINT"200 L=LEN(L$)
13061 [153]"210 IF L=ML GOTO230
13062 PRINT"220 FORJ=1TOML-L:?S$(8);:NEXT
13090 [153]"230 ?"[199](34)""[199](34)"L$"[199](34)"THEN"[199](34)";";
13091 [153][199](34)"WAIT"[199](34)";"
13100 [153]"240 S=V(I)*30/MAXV"
13110 [153]"250 IS=INT(S):FS=S-IS"
13115 [153]"255 IFIS=0GOTO270"
13120 [153]"260 FORJ=1TOIS:?S$(8);:NEXT"
13130 [153]"270 ?S$(8*FS)"
13140 [153]"280 NEXT"
13145 [153]:[153]"(NOTE THAT #230 INCLUDES A RVS-OFF)"
13150 [153]:[153]"ENTER THESE STATEMENTS AND TRY IT"
13160 [153]"TYPE @WAIT TO CONTINUE."
13170 SN$[178]"15000":[137]63400
15000 [141]60000:[153]"LOAD":MS$[178]"IT WORKS!":[141]63100
15001 [153]"LOADLET ME SAY ONE LAST THING..ABOUT GETWAIT."
15005 [153]:[153]"YOU MAY TYPE THINGS ON THE KEYBOARD"
15010 [153]:[153]"WHILE I'M BUSY DOING SOMETHING..."
15015 [153]:[153]"AND I'LL KEEP UP TO 10 KEYPUNCHES IN A"
15020 [153]:[153]"'KEYBOARD BUFFER'."
15025 [153]:[153]"WHEN I RETURN TO 'GET' THE NEXT INST'N "
15030 [153]:[153]"FROM THE KEYBOARD I'LL CHECK THE BUFFER"
15035 [153]:[153]"AND TAKE THE ENTRIES FROM THERE."
15036 [153]:[153]"(IN FACT I ALWAYS TAKE KEYBOARD INPUT"
15037 [153]:[153]"FROM THE KEYBOARD BUFFER)."
15038 [153]:[141]63000
15040 [153]"LOADWHEN WRITING A PROGRAM YOU CAN INCLUDE"
15045 [153]:[153]"A STATEMENT LIKE:"
15050 [153]:[153]"100 GETA$:IFA$="[199](34)[199](34) "GOTO100"
15060 [153]:[153]"THAT SAYS:'GET' A CHARACTER FROM THE "
15065 [153]"KEYBOARD BUFFER,IF THE CH'R IS NULLWAIT"
15070 [153]:[153]"(SEE..'NOTHING' BETWEEN THE QUOTES!)"
15075 [153]:[153]"THEN KEEP TRYING!!"
15076 [153]:[153]:[141]63000
15080 [153]"LOADTO EMPTY THE BUFFER:"
15085 [153]:[153]"100 FORI=1TO10:GETA$:NEXT"
15090 [153]:[153]"..TAKING 10 CHARACTERS FROM THE BUFFER."
15095 [153]:[153]"THAT'S ENOUGH TO EMPTY IT!"
15100 [153]:[153]"..OR YOU CAN HAVE:"
15110 [153]:[153]"100 GETA$:IFA$<>"[199](34)[199](34)"THEN100"
15115 [153]"THIS WILL 'GET' A CHARACTER UNTIL THE "
15120 [153]"BUFFER IS EMPTY."
15125 [153]:[141]63000
15130 [153]"LOADDURING TUTORWAIT YOU MAY HAVE NOTICED:"
15135 [153]"'HIT RETURNWAIT TO CONTINUEWAIT'."
15140 [153]"THE LITTLE SUBROUTINE WHICH PRINTS"
15145 [153]"THIS AT THE BOTTOM OF THE SCREEN.."
15146 [153]"THEN WAITS!..IS:"
15150 [141]63000
15165 [153]"LOAD":MS$[178]"AU REVOIR!WAIT":[141]63100:[141]63500:[153]""
15170 [155]63000[171]63003
20000 [153]"LOAD"
20005 [153]"LOAD BEFORE I FORGET, I SHOULD INTRODUCE"
20010 [153]"MY FRIEND"[199](34)"CURSOR"[199](34)"."
20015 [129]I[178]1[164]1000:[130]
20016 WD[178]80:[151]32768[170]1024,96:[139][194](32768)[178]96[167]WD[178]40
20020 [153]"I CALL HIM CRSRWAIT FOR SHORT."
20025 [129]I[178]1[164]1500:[130]
20030 [153]"COME ON CRSR..DON'T BE SHY."
20040 [129]I[178]1[164]2000:[130]
20050 [129]I[178]1[164]10
20060 [153]"";:[130]
20070 [153][166]14);
20080 [129]I[178]1[164]8:[129]T[178]1[164]50:[130]
20090 [153]" CMDON WAITCMD";:[130]
20100 [129]I[178]1[164]500:[130]
20110 [153]" _THAT'S HIM"
20120 CSR[178]32768[170]8[172]WD[170]14:[129]I[178]1[164]100:[151]CSR,32:[151]CSR,160:[130]
20130 [153]"THEN WE HAVE CRSR-LEFT";
20140 [153]" "[199](34)"CMD"[199](34)
20141 [129]I[178]1[164]500:[130]:[153]
20150 [153]"AND CRSR-RIGHT";
20160 [153]" "[199](34)""[199](34)
20161 [129]I[178]1[164]500:[130]:[153]
20170 [153]"AND CRSR-UP";
20180 [153]" "[199](34)"ON"[199](34)
20181 [129]I[178]1[164]500:[130]:[153]
20190 [153]"AND CRSR-DOWN";
20200 [153]" "[199](34)""[199](34)
20201 [129]I[178]1[164]1500:[130]:[153]
20210 [153]"(ALL BROTHERS,OF COURSE)."
20215 [129]I[178]1[164]1000:[130]:[153]
20220 [153]"WE ALSO HAVE HOME";
20230 [153]" "[199](34)""[199](34)
20231 [129]I[178]1[164]200:[130]
20240 [153]"..AND CLEAR ";
20250 [153]" "[199](34)"LOAD"[199](34)
20251 [129]I[178]1[164]200:[130]
20260 [153]"..AND RVS "[199](34)""[199](34)
20261 [129]I[178]1[164]200:[130]
20270 [153]"..AND RVS-OFF "[199](34)"WAIT"[199](34)
20280 [129]I[178]1[164]500:[130]:[153]
20290 [153]">>>GET TO KNOW THEM<<<"
20295 [129]I[178]1[164]200:[130]:[153]
20300 [153]"INSIDE QUOTES,THEY DO THEIR THING."
20400 [129]I[178]1[164]500:[130]:[153]
20500 [141]63000:[142]
23360 [141]63000
59000 [153]"LOAD":[141]63100
59001 [153]"DURING THE TUTORIAL YOU MAY WISH"
59002 [153]"TO RETURN TO AN EARLIER 'PAGE'."
59003 [153]"JUST HIT THE @-KEYWAIT, AT ANY TIME,"
59004 [153]"AND THE TUTORIAL WILL BACK UP"
59005 [153]"A PAGE OR TWO."
59006 [153]"ALSO, YOU HAVE AN OPPORTUNITY TO"
59007 [153]"COMPOSE YOUR OWN PROGRAMS."
59008 [153]"WHEN YOU WISH TO CONTINUE WITH"
59009 [153]"THE TUTORIAL, HIT THE @-KEYWAIT!":[141]63000
59010 MS$[178]"@WAIT_REMEMBER":[141]63100
59020 [141]63000:[142]
60000 [151]204,1:[143] INITIALIZE
60001 BT$[178]"":[129]I[178]1[164]24:BT$[178]BT$[170]"":[130]
60002 PT$[178]"ORTANTANTANTANTANTANTANTANTANTAN^CMDCMDCMDCMDCMDCMDCMDCMDCMDCMDCMDCMD(null)(null)CMDCMDCMDCMDCMDCMDCMDCMDCMDCMDCMDCMD/=TANTANTANTANTANTANTANTAN=EXP"
60003 PT$[178]PT$[170]"CMDCMDCMDCMDCMDCMDCMDCMDCMDCMDCMDCMDCMD(null)TAB(TAB(TAB(TAB(TAB(TAB(TAB(TAB(TAB(TAB(TAB(TAB((null)CMDCMDCMDCMDCMDCMDCMDCMDCMDCMDCMDCMDCMDCMDFN============THEN"
60004 PT$[178]PT$[170]"CMDCMDCMDCMDCMDCMDCMDCMDCMDCMDCMDCMDCMDCMD(null)(null)TAB(TAB(TAB(TAB(TAB(TAB(TAB(TAB(TAB(TAB((null)(null)ONONONONCMDCMDCMDCMDCMDCMDCMDCMDCMDCMDCMDCMD"
60005 PT$[178]BT$[170]"ONONONONONON"[170]PT$[170]"STOP"
60007 ML$[178]""
60008 WD[178]40:CRT[178]1024:[153][199](142)
60009 W2[178]WD[173]2:W3[178]WD[171]1:W1$[178][202]([196](WD),2):
60010 W2$[178][202]([196](W2),2):W3$[178][202]([196](W3),2)
60020 [153]"LOAD":[151]53281,15:[151]53280,12:[153]"STOP"
60998 [139][194](789)[179][177]7[172]16[170]15[167][158](7[172]4096[170]15[172]256[170]12[172]16[170]3)
60999 [142]
61000 [143]*NEW WORKSPACE
61001 M[178]7[172]4096[170]15[172]256[170]15[172]16
61002 [140]
61003 [129]I[178]M[164]M[170]15:[135]K:[151]I,K:[130]
61004 [131] 1,96,3,96,3,96,3,96
61005 [131] 144,127,0,0,144,127,0,0
61006 M[178]6[172]4096:[129]I[178]0[164]2:[151]M[170]I,0:[130]
61007 [142]
63000 [153]"HIT RETURNWAIT TO CONTINUE";
63001 [161]A$:[139]A$[179][177]""[167]63001
63002 [161]A$:[139]A$[178]""[167]63002
63003 [153]:[142]
63100 [129]T[178]1[164]5:[153]PT$MS$;
63101 [153]PT$" ";
63102 [153]PT$MS$;:[130]
63103 [153]:[142]
63200 [151]56,96:[151]52,96:[151]55,0:[151]51,0:[141]61000
63201 WD[178]40:[153][199](142)
63202 M[178]7[172]4096[170]15[172]256[170]9[172]16
63203 [129]I[178]M[164]M[170]91:[135]K:[151]I,K:[130]
63204 [131]165,203,201,46,208,83,32,195,127,165,44,201,8,240,3,32,177,127,32
63205 [131]142,166,165,44,201,8,240,3,76,128,164,76,174,167,162,16,189,239
63206 [131]127,72,181,42,157,239,127,104,149,42,202,208,241,96,120,173,238,127
63207 [131]77,20,3,141,20,3,173,239,127,77,21,3,141,21,3,88,96,173,20,3,73
63208 [131]144,141,238,127,173,21,3,73,127,141,239,127,96,76,255,255
63216 [151]M[170]90,[194](788):[151]M[170]91,[194](789)
63220 KEY[178]7[172]4096[170]15[172]256[170]13[172]16[170]8
63221 [158](KEY):[143] KEY FOR IRQ SWAP
63299 [142]
63300 [143]*SWITCH TO NEW WORKSPACE
63301 [141]63600:[143] RUN NUMBER
63302 [141]61000:[143] NEW THE WORKSPACE
63303 [137]63403
63400 [143]*SWITCH TO OLD WORKSPACE
63401 [141]63600
63403 SWTCH[178]7[172]4096[170]15[172]256[170]9[172]16[170]15
63404 [158](SWTCH):[143] SWAP POINTERS
63405 [151]204,2:[128]
63500 [143]*RESTORE PET
63501 SN$[178]"100":[141]63600
63502 M[178]7[172]4096[170]15[172]256[170]12[172]16[170]3:[139][194](789)[178]7[172]16[170]15[167][158]M
63503 [142]
63600 [143]*INSERT RUN NUMBER
63601 M[178]2059:SN$[178]"00000"[170]SN$
63602 [129]I[178]1[164]5:[151]M[171]I,[198]([201](SN$,I)):[130]:[142]